//导入express 模块
const express = require('express')

//引入数据库模块
const db = require('../db/index.js')

//使用路由
const cars = express.Router()

//引入handle模块
const car_handle = require('../handle-cars/cars.js')

//获首页展示车列表
cars.post('/carlistshow', car_handle.getshowCarlist)

//获取车列表
cars.post('/carlist', car_handle.getCarlist)

//获取车列表
cars.post('/idcarlist', car_handle.getIdCarlist)


//添加产品
cars.post('/addCar', car_handle.addCar)

//删除产品
cars.post('/deleteCar', car_handle.deleteCar)

module.exports = cars